# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Philipp Sandhaus <philipp.sandhaus@gmx.de>

pkgname=ktoblzcheck
pkgver=1.53
pkgrel=5
pkgdesc="A library to check account numbers and bank codes of German banks"
arch=('loong64' 'x86_64')
url="http://ktoblzcheck.sourceforge.net"
license=('LGPL')
depends=('python')
makedepends=('cmake')
source=(https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
sha256sums=('18b9118556fe83240f468f770641d2578f4ff613cdcf0a209fb73079ccb70c55')

prepare() {
  cd "${srcdir}"

  [[ ! -d build ]] && mkdir build
}

build() {
  cd "${srcdir}"/build

  cmake \
    ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_BANKDATA_DOWNLOAD=OFF
  make
}

package() {
  cd "${srcdir}"/build

  make DESTDIR="${pkgdir}" install
}
